<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<!-- RichFaces tag library declaration -->
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<f:subview id="sbvLecturer">
	<rich:toolBar styleClass="menuAll">
		<rich:toolBarGroup>
			<rich:dropDownMenu value="Моят профил" direction="bottom-right"
				submitMode="server" styleClass="search">
				<rich:menuItem submitMode="server" style="width:250px;"
					disabled="true">
					<h:panelGrid columns="3" id="profileGrid"
						style="margin-left:40px;margin-top:5px;width:250px">
						<h:outputText value="Име:" styleClass="outputTextLabel" />
						<h:outputText value="#{mbLecturer.resultUser.firstName}"
							styleClass="outputTextValue" />
						<rich:spacer width="15" />
						<h:outputText value="Презиме:" styleClass="outputTextLabel" />
						<h:outputText value="#{mbLecturer.resultUser.secondName}"
							styleClass="outputTextValue" />
						<rich:spacer width="15" />
						<h:outputText value="Фамилия:" styleClass="outputTextLabel" />
						<h:outputText value="#{mbLecturer.resultUser.thirdName}"
							styleClass="outputTextValue" />
						<rich:spacer width="15" />
						<h:outputText value="Потребител:" styleClass="outputTextLabel" />
						<h:outputText value="#{mbLecturer.resultUser.username}"
							styleClass="outputTextValue" />
						<rich:spacer width="15" />
						<h:outputText value="Стара парола:" styleClass="outputTextLabel" />
						<h:inputSecret value="#{mbLecturer.resultUser.password}" size="13" />
						<rich:spacer width="15" />
						<h:outputText value="Нова парола:" styleClass="outputTextLabel" />
						<h:inputSecret value="#{mbLecturer.newPass}" size="13" />
						<rich:spacer width="15" />
						<h:outputText value="Потвърди:" styleClass="outputTextLabel" />
						<h:inputSecret value="#{mbLecturer.validatePass}" size="13" />
						<rich:spacer width="15" />
						<h:outputText value="Ел. поща:" styleClass="outputTextLabel" />
						<h:inputText value="#{mbLecturer.resultUser.mail}" size="13" />
					</h:panelGrid>
					<a4j:commandButton style="margin-left:100px;margin-bottom:10px"
						reRender="profileGrid" value="Направи промените"
						action="#{mbLecturer.updateProfile}" />
				</rich:menuItem>
			</rich:dropDownMenu>
		</rich:toolBarGroup>
		<rich:dropDownMenu value="Моите задания" submitMode="none">
			<rich:menuItem submitMode="server">
				<h:commandLink value="Качи ново задание"
					action="#{mbLecturer.navToNewTask}" />
			</rich:menuItem>
			<rich:menuItem submitMode="none">
				<h:commandLink value="Виж/свали"
					action="#{mbLecturer.navToPreviewDownloadTask}" />
			</rich:menuItem>
			<rich:menuItem>
				<a4j:commandLink value="Изтрий"
					reRender="pnlAllTask,lecturerMessages"
					action="#{mbLecturer.deleteLecturerTask}" />
			</rich:menuItem>
		</rich:dropDownMenu>
		<rich:dropDownMenu value="Входящи домашни">
			<rich:menuItem submitMode="none">
				<a4j:commandLink value="Виж/Свали"
					reRender="mdlPanelPreviewHomework"
					oncomplete="Richfaces.showModalPanel('mdlPanelPreviewHomework')" />
			</rich:menuItem>
			<rich:menuItem submitMode="none">
				<a4j:commandLink value="Оцени домашно"
					reRender="lecturerMessages,panellAllHomeworks"
					action="#{mbLecturer.rateHomework}" />
			</rich:menuItem>
			<rich:menuItem submitMode="none">
				<h:commandLink value="Изтриий домашно"
					action="#{mbLecturer.deleteIncomingHomework}" />
			</rich:menuItem>
		</rich:dropDownMenu>
		<rich:toolBarGroup location="right">
			<rich:dropDownMenu value="Търси">
				<rich:menuItem submitMode="none" style="width:650px;"
					disabled="true">
					<h:panelGrid columns="2" style="margin-top:0px">
						<h:panelGrid style="width:350px;margin-top:0px">
							<h:outputText styleClass="outputTextValue"
								style="margin-left:27px;" value="Критерии за търсене на задание" />
							<h:panelGrid columns="2" style="margin-left:25px;">
								<h:outputText value="Име:" styleClass="outputTextLabel" />
								<h:inputText size="15" value="#{mbLecturer.searchTask.title}" />
								<h:outputText value="Дата на ъплоуд след:"
									styleClass="outputTextLabel" />
								<rich:calendar styleClass="outputTextValue" inputSize="15"
									value="#{mbLecturer.searchTask.startDate}"
									datePattern="#{mbLecturer.datePattern}" />
								<h:outputText value="Валидно до:" styleClass="outputTextLabel" />
								<rich:calendar styleClass="outputTextValue" inputSize="15"
									value="#{mbLecturer.searchTask.endDate}"
									datePattern="#{mbLecturer.datePattern}" />
							</h:panelGrid>
							<a4j:commandButton style="margin-left:120px;"
								reRender="pnlAllTask" value="Търси задания"
								action="#{mbLecturer.searchTasks}" />
						</h:panelGrid>
						<h:panelGrid style="width:350px;margin-top:0px">
							<h:outputText value="Критерии за търсене на входящи домашно"
								styleClass="outputTextValue" />
							<h:panelGrid columns="2">
								<h:outputText value="Име на студента:"
									styleClass="outputTextLabel" />
								<h:inputText
									value="#{mbLecturer.searchHomework.student.firstName}"
									size="15" />
								<h:outputText value="Фамилия на студента:"
									styleClass="outputTextLabel" />
								<h:inputText
									value="#{mbLecturer.searchHomework.student.thirdName}"
									size="15" />
								<h:outputText value="Дата на получаване до:"
									styleClass="outputTextLabel" />
								<rich:calendar inputSize="15"
									datePattern="#{mbLecturer.datePattern}"
									value="#{mbLecturer.searchHomework.sentDate}" />
								<h:outputText value="По задание с име:"
									styleClass="outputTextLabel" />
								<h:inputText size="15"
									value="#{mbLecturer.searchHomework.task.title}" />
							</h:panelGrid>
							<a4j:commandButton style="margin-left:120px;"
								action="#{mbLecturer.searchHomeworks}"
								reRender="panellAllHomeworks" value="Търси домашни" />
						</h:panelGrid>
					</h:panelGrid>
				</rich:menuItem>
			</rich:dropDownMenu>
		</rich:toolBarGroup>
	</rich:toolBar>
</f:subview>
